package com.cjj.controller;

import com.cjj.service.TInterposeSchemeService;
import com.cjj.vo.TNumberVo;
import com.github.pagehelper.PageInfo;
import com.guigu.pojo.TInterposeScheme;
import com.guigu.pojo.TInterveneModel;
import com.guigu.pojo.TMember;
import com.guigu.viwe.PageVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/interposeScheme")
public class TInterposeSchemeController {

    @Resource
    private TInterposeSchemeService tInterposeSchemeService;

    @RequestMapping("/queryTInterposeScheme")
    public PageInfo<TNumberVo> queryTInterposeScheme(@RequestBody PageVo<TNumberVo> tMemberPageVo) {
        return this.tInterposeSchemeService.queryTInterposeScheme(tMemberPageVo);
    }

    @RequestMapping("/queryOption")
    public List<TInterveneModel> queryOption(){
        return this.tInterposeSchemeService.queryOption();
    }

    @RequestMapping("/changeModel")
    public TInterveneModel changeModel(String id){
        return this.tInterposeSchemeService.changeModel(id);
    }

    @RequestMapping("/addIntervent")
    public int addIntervent(@RequestBody TInterposeScheme tInterposeScheme){

        return this.tInterposeSchemeService.addIntervent(tInterposeScheme);
    }
}
